The present invention relates to a motor controller and an electric power steering apparatus.
Conventionally, a motor controller that controls a motor through supply of drive power of three phases (U, V, and W-phases) to the motor operates on the presumption that the resistance values of the phases are equal. Thus, on such presumption, the motor controller adjusts the voltages supplied to the phases in such a manner that the amounts of the electric currents flowing in the phases become equal. In other words, the motor controller adjusts the voltages supplied to the phases in such a manner that the waveforms of the electric currents of the phases have equal amplitudes and the sum of the electric currents of the phases at a common rotation angle becomes zero. However, in reality, the resistance values of the phases are not necessarily equal due to different lengths of cables or vary depending on whether failsafe phase opening relays are provided for the phases. This results in unequal electric currents flowing in the phases, causing a torque ripple. Normally, the phase opening relays are provided only for two of the three phases.
For example, a motor controller disclosed in Japanese Laid-Open Patent Publication No. 2005-170294 corrects the voltages of the two phases having the phase opening relays or the voltage of the phase without a phase opening relay so that the electric currents flowing in the phases become equal, taking the resistance values of the phase opening relays into account. This suppresses a torque ripple and allows smooth rotation of the motor.
However, the motor controller operates on the presumption that the resistance values of the phase opening relays and those of the phases are equal. This prevents the motor controller from performing appropriately if the resistance values of the phase opening relays are varied or the lengths of the cables are unequal among the phases. To solve this problem, the voltages of all of the three phases may be corrected. However, this increases calculation load and requires the use of a calculation device (a microcomputer) with higher performance, which raises the manufacturing cost.